<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMessagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('messages', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('project_id')->unsigned()->index();
            $table->string('line')->nullable()->comment('网络通讯线缆');
            $table->string('line_set')->nullable()->comment('网络通讯线缆铺设');
            $table->string('offline')->nullable()->comment('通讯延时');
            $table->string('online')->nullable()->comment('通讯宽带要求');
            $table->string('lost_package')->nullable()->comment('丢包率');
            $table->string('change')->nullable()->comment('交换设备');
            $table->string('check_date')->nullable()->comment('测试日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('messages');
    }
}
